//
//  GGComposeVC.swift
//  DongBaoDemo
//
//  Created by 陈志勇 on 2018/8/4.
//  Copyright © 2018年 陈志勇. All rights reserved.
//

import UIKit

class GGComposeVC: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        setUpBackBtn()
    }

}

extension GGComposeVC {
    private func setUpBackBtn() {
        
        let button = UIButton(type: .custom)
        button.frame = CGRect(x: 0, y: 0, width: 100, height: 100)
        button.center = view.center
        button.setTitle("返回", for: .normal)
        button.addTarget(self, action: #selector(goBack), for: .touchUpInside)
        view.addSubview(button)
    }
    
    @objc func goBack() {
        dismiss(animated: true, completion: nil)
    }
}
